<%--
  Created by IntelliJ IDEA.
  User: 曾东
  Date: 2022/4/13
  Time: 18:50
  To change this template use File | Settings | File Templates.
--%>
<%--获取集合类型参数--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
<head>
    <title>Title</title>
    <script src="${pageContext.request.contextPath}/js/jquery-3.6.0.js"></script>
    <script>
        var userList = new Array();
        userList.push({username:"zhangshan",age:18});
        userList.push({username:"lisi",age:20});

        $.ajax({
            type:"POST",
            url:"${pageContext.request.contextPath}/user/quick15",
            data:JSON.stringify(userList),//把userList转化成Json字符串的格式
            contentType:"application/json;charset=utf-8"//使用application/json那么data的类型必须是json字符串  这里可以参考：https://blog.csdn.net/qq_28165595/article/details/84921294
        })
    </script>
</head>
<body>

</body>
</html>
